home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: void pointers
- Date: 12 Jan 1996 05:41:39 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Jan11224139@qcd.lanl.gov>
- References: <1996Jan12.133322.1@ccc.govt.nz>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: mcauslanb@ccc.govt.nz's message of 12 Jan 96 13:33:22 NZDT
-
- --text follows this line--
- In article <1996Jan12.133322.1@ccc.govt.nz> mcauslanb@ccc.govt.nz
- writes:
- <snip>
- I am writing a C program for an application that has a development language
- based on ANSI C.
-
- A function that I need to call is defined:
- void getFence (void **clipPP);
-
- where "clipPP" is returned by the function.
-
- 1) How do I declare and pass clipPP?
-
- Depends on the documentation of the function. Maybe something like
-
- void *clipPP; /* may be required to be initialized */
- getFence (&clipPP);
-
- or, it may be something like
-
- void **clipPP = 0 /* or maybe some other pointer value */ ;
- getFence (clipPP);
-
- etc. etc. etc.
-
- 2) What is actually going on?
-
- It is accepting the address of an object which can store an arbitary
- data pointer. Note that it is the object whose address is passed which
- can store an arbitrary data pointer. Do not confuse this with a
- function that can take an arbitrary data pointer.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-